<template>
  <div class="yingyong">
    <div class="yingyong_body minh389">
      <img src="@assets/img/hangye/hy_ad.png" alt="" class="fill_img" />
      <div class="yingyong_box">
        <div class="nav_li" v-for="(item, index) in hangyeList" :key="index" @click="nativeTo(item)">
          <img
            :src="httpp+ item.thumbnail"
            alt=""
            class="li_img"
          />
          <div class="t_text">{{ item.name }}</div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>

export default {
  components: {
    
  },
  mounted(){
    this.httpp = this.$httpp;
    this.$getApi("/common/hangyeyyong", {}).then((res) => {
      console.log(res)
      this.hangyeList = res.data;
    })
  },
  data() {
    return {
      httpp:"",
      hangyeList: [],
    };
  },
  methods: {
    nativeTo(item){
      window.open(item.url)
    }
  },
};
</script>

<style scoped lang="stylus">
.yingyong_body {
  width: 1000px;
  margin: 12px auto;

  .yingyong_box {
    display: flex;
    flex-wrap: wrap;

    .nav_li {
      box-sizing: border-box;
      width: calc(20% - 20px);
      padding: 26px 0px 10px;
      margin: 0 10px;
      text-align: center;
      cursor: pointer;

      .t_text {
        font-size: 16px;
        padding-top 6px
        color #666
      }

      .li_img {
        opacity:0.7;
        transition: 0.6s all;
        border-radius 50%;
      }

      &:hover {
        .li_img {
          opacity: 1;
          box-shadow : 0 0 6px #2172ce 
        }
        .t_text{
          color #000
        }
      }
    }
  }
}
</style>
